#include <math.h>

double Avg(int N, int data[]) {
    int sum = 0;
    for (int i = 0; i < N; i++)
        sum += data[i];
    return (double)sum / N;
}

double StdDev(int N, int data[]) {
    double avg = Avg(N, data);
    double sum_sq_diff = 0.0;
    for (int i = 0; i < N; i++) {
        double diff = data[i] - avg;
        sum_sq_diff += diff * diff;
    }
    return sqrt(sum_sq_diff / N);
}
